package SV_XSS_REF;
import jakarta.servlet.http.*;
public class Vunerable_02 {
    protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        String action = req.getParameter("action");
        if ("chart".equals(action)) {
            renderChart(res.getOutputStream());
        } else if ("table".equals(action)) {
            renderTable(res.getOutputStream());
        } else {
            throw new ServletException("Cannot find action " + action);
        }
    }

    private void renderTable(ServletOutputStream outputStream) {
        //...
    }

    private void renderChart(ServletOutputStream outputStream) {
        //...
    }
}
